import i18n from '@/lang'
export const flowDesignTbColumns = [
  {
    slots: {
      title: 'noteForSelect'
    },
    key: 'noteForSelect',
    width: 0,
    fixed: 'left'
  },
  {
    // slots: {
    //   title: 'flowNameTitle'
    // },
    title: i18n.t('flowName'),
    dataIndex: 'definitionName',
    key: 'flowName',
    width: 200,
    scopedSlots: { customRender: 'flowName' }
  },
  {
    title: i18n.t('flowCode'),
    dataIndex: 'definitionCode',
    key: 'flowCode',
    width: 200,
    scopedSlots: { customRender: 'flowCode' }
  },
  {
    title: i18n.t('withdrawType'),
    dataIndex: 'cancelType',
    key: 'withdrawType',
    width: 200,
    scopedSlots: { customRender: 'withdrawType' }
  },
  {
    title: i18n.t('timeOfCreation'),
    dataIndex: 'createTime',
    key: 'createTime',
    width: 200,
    scopedSlots: { customRender: 'createTime' },
    sorter: true

  },
  {
    title: i18n.t('operation'),
    dataIndex: '',
    key: 'operation',
    width: 260,
    scopedSlots: { customRender: 'operation' },
    fixed: 'right'
  }
]

export const flowDesignDetailNodeAttrColumns = [
  {
    title: i18n.t('nodeCode'),
    dataIndex: 'flowElementId',
    key: 'flowElementCode',
    width: '140px',
    scopedSlots: { customRender: 'flowElementCode' }
  },
  {
    title: i18n.t('nodeName'),
    dataIndex: 'flowElementName',
    key: 'flowElementName',
    width: '200px',
    scopedSlots: { customRender: 'flowElementName' }
  },
  {
    title: i18n.t('approvalRole'),
    dataIndex: 'roleCandidatesName',
    key: 'approvalRole',
    width: '120px',
    scopedSlots: { customRender: 'approvalRole' }
  },
  {
    title: i18n.t('approver'),
    dataIndex: 'assignee',
    key: 'approver',
    width: '260px',
    scopedSlots: { customRender: 'approver' }
  },
  {
    dataIndex: 'canResultNotice',
    key: 'canResultNotice',
    width: '100px',
    slots: {
      title: 'resultNoticeColumn'
    },
    scopedSlots: { customRender: 'canResultNotice' },
    label: i18n.t('resultNotice')
  },
  {
    dataIndex: 'canInstanceCancelNotice',
    key: 'canInstanceCancelNotice',
    width: '100px',
    slots: {
      title: 'canInstanceCancelNoticeColumn'
    },
    scopedSlots: { customRender: 'canInstanceCancelNotice' },
    label: i18n.t('cancelNotice')
  },
  {
    title: i18n.t('nodeRemark'),
    dataIndex: 'flowElementRemark',
    key: 'remark',
    width: '200px',
    scopedSlots: { customRender: 'remark' }
  }
]

export const cancelTypeEnumArr = [{ value: 10, name: i18n.t('force') }, { value: 20, name: i18n.t('nonforce') }]
